//
//  PKIMUtils_HuanXin.swift
//  Panku
//
//  Created by mac on 2017/2/9.
//  Copyright © 2017年 Monster. All rights reserved.
//

import UIKit

class PKIMUtils_HuanXin: PKIMUtils {
    
    override func register(With name: String, password: String) -> NSError? {
        
        let emError = EMClient.shared().register(withUsername: name, password: password)
        
        if emError == nil{
            return nil
        }
        
        let error = NSError(domain: "", code: Int(emError!.code.rawValue), userInfo: ["descrption":emError!.description])
        return error
    }
    
    override func login(With name:String,password:String) -> NSError?{return NSError()}
    override func setIsAutoLogin(auto:Bool) -> Void{}
    override func logout() -> Void{}
}
